<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>强制结算</title>
<link rel="stylesheet" type="text/css" href="../plugin/layui/css/layui.css" />
<link rel="stylesheet" type="text/css" href="../src/lvdong/css/forcedSettlement.css">
<script src="../plugin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="../plugin/echarts.js" type="text/javascript" charset="utf-8"></script>
<script src="../plugin/jquery.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	<div class="title">
		<blockquote class="layui-elem-quote" style="font-size: 30px;">
			强制结算表&nbsp;&nbsp;<span id="datetime"></span>
		</blockquote>
	</div>
	<div id="forcedSettlement">
		<table class="layui-hide" id="forced" lay-filter="forced"></table>
	</div>
	<script type="text/html" id="toolbarselect">
		<div class="layui-form">
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label" style="width:100px;">营业日期：</label>
					<div class="layui-input-inline" style="width:150px;">
						<input class="layui-input" id="start" type="text">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label" style="width:40px;">至：</label>
					<div class="layui-input-inline" style="width:150px;">
						<input class="layui-input" id="end" type="text">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label" style="width:60px;">状态</label>
					<div class="layui-input-inline" style="width:100px;">
						<select name="status" id="status">
							<option value="">全选</option>
							<option value="未处理">未处理</option>
							<option value="已处理">已处理</option>
						</select>
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label" style="width:100px;">处理方式</label>
					<div class="layui-input-inline" style="width:100px;">
						<select name="handle" id="handle">
							<option value="">全选</option>
							<option value="额外收入">额外收入</option>
						</select>
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label" style="width:100px;">腕带编号</label>
					<div class="layui-input-inline" style="width:100px;">
						<input name="wriststrpid" class="layui-input" type="text" id="wriststrpid" autocomplete="off"
							lay-verify="wriststrpid">
					</div>
				</div>
				<div class="layui-inline">
					<button class="layui-btn" type="button" lay-event="query" style="margin-left:20px">查询</button>
				</div>
			</div>
	</script>
	<script>
		layui.use('table', function() {
			var table = layui.table;
			table.render({
				elem : '#forced',
				url : '/finStatistics/CompulsorySettlement',
				height : 'full-120',
				limit : 30,
				toolbar : '#toolbarselect',
				cols : [ [ {
					field : 'id',
					align : 'center',
					title : '序号'
				}, {
					field : 'wriststrp_id',
					align : 'center',
					title : '腕带编号'
				}, {
					field : 'outstanding_amount',
					align : 'center',
					title : '未退金额'
				}, {
					field : 'refund_amount',
					align : 'center',
					title : '退还金额'
				}, {
					field : 'settlement_date',
					align : 'center',
					title : '结算日期'
				}, {
					field : 'status',
					align : 'center',
					title : '状态'
				}, {
					field : 'distributor',
					align : 'center',
					title : '发放人'
				}, {
					field : 'executor',
					align : 'center',
					title : '处理人'
				}, {
					field : 'processing_time',
					align : 'center',
					title : '处理时间'
				}, {
					field : 'processing_mode',
					align : 'center',
					title : '处理方式'
				}, {
					field : 'extra_income',
					align : 'center',
					title : '额外收入'
				} ] ],
				page : true
			});
		});
	</script>
	<script>
		layui.use('laydate', function() {
			var laydate = layui.laydate;
			laydate.render({
				elem : '#start'
			});
			laydate.render({
				elem : '#end'
			});
		});
		layui.use('table', function() {
			var table = layui.table;
			var start = "";
			var end = "";
			var status = "";
			var handle = "";
			var wriststrpid = "";
			table.on('toolbar(forced)', function(obj) {
				switch (obj.event) {
				case 'query':
					table = layui.table;
					start = $("#start").val();
					end = $("#end").val();
					status = $("#status").val();
					handle = $("#handle").val();
					wriststrpid = $("#wriststrpid").val();
					table.reload('forced', {
						url : "/finStatistics/CompulsorySettlement",
						where : {
							start : $("#start").val(),
							end : $("#end").val(),
							status : $("#status").val(),
							handle : $("#handle").val(),
							wriststrpid : $("#wriststrpid").val()
						}
					});
					$("#start").val(start);
					$("#end").val(end);
					$("#status").val(status);
					$("#handle").val(handle);
					$("#wriststrpid").val(wriststrpid);
					layui.use('laydate', function() {
						var laydate = layui.laydate;
						laydate.render({
							elem : '#start'
						});
						laydate.render({
							elem : '#end'
						});
					});
					layui.use('form', function() {
						var form = layui.form;
						form.render();
					});
				}
				;
			});
		});
	</script>
</body>
</html>
